/*  wowmapper - World of Warcraft MAP ParsER
Copyright (C) 2010 PferdOne

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>. */
#pragma once
#include <Windows.h>
#include <string>

#include "..\src\common.h"
#include "..\libs\Casclib\CascLib.h"

class CascHandler {
public:
	CascHandler();
	
	int CascOpen(const TCHAR * szStorage);

	/** Get a file from our MPQs through its name and return the data. **/
	bool CascGetFile(const std::string &filename, BufferS_t *buffer) const;

	bool CascClose();

private:
	HANDLE hStorage;
	int nError = ERROR_SUCCESS;
};

